<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PxContactModifyCallback Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="PhysXLogoBlack.png"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classPxContactModifyCallback.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classPxContactModifyCallback-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PxContactModifyCallback Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__physics.html">Physics</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>An interface class that the user can implement in order to modify contact constraints.  
 <a href="classPxContactModifyCallback.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="PxContactModifyCallback_8h_source.html">PxContactModifyCallback.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a383f0448886bf352215c886b3066f790"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxContactModifyCallback.html#a383f0448886bf352215c886b3066f790">onContactModify</a> (<a class="el" href="classPxContactModifyPair.html">PxContactModifyPair</a> *const pairs, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> count)=0</td></tr>
<tr class="memdesc:a383f0448886bf352215c886b3066f790"><td class="mdescLeft">&#160;</td><td class="mdescRight">Passes modifiable arrays of contacts to the application.  <a href="#a383f0448886bf352215c886b3066f790">More...</a><br /></td></tr>
<tr class="separator:a383f0448886bf352215c886b3066f790"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:ad6c57abf114d4c594973c2d365a98b6f"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxContactModifyCallback.html#ad6c57abf114d4c594973c2d365a98b6f">~PxContactModifyCallback</a> ()</td></tr>
<tr class="separator:ad6c57abf114d4c594973c2d365a98b6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An interface class that the user can implement in order to modify contact constraints. </p>
<p><b>Threading:</b> It is <b>necessary</b> to make this class thread safe as it will be called in the context of the simulation thread. It might also be necessary to make it reentrant, since some calls can be made by multi-threaded parts of the physics engine.</p>
<p>You can enable the use of this contact modification callback by raising the flag <a class="el" href="structPxPairFlag.html#a60e71a2948b030140f840766a3f7ac2fa2465a37a9b236f662bda8d6636eed59b" title="Call contact modification callback for this collision pair. ">PxPairFlag::eMODIFY_CONTACTS</a> in the filter shader/callback (see <a class="el" href="group__physics.html#ga235380b2a5b3cc89a4cd89d089d72b33" title="Filter shader to specify handling of collision pairs. ">PxSimulationFilterShader</a>) for a pair of rigid body objects.</p>
<p>Please note: + Raising the contact modification flag will not wake the actors up automatically. + It is not possible to turn off the performance degradation by simply removing the callback from the scene, the filter shader/callback has to be used to clear the contact modification flag. + The contacts will only be reported as long as the actors are awake. There will be no callbacks while the actors are sleeping.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxScene.html#aeec3367a4461c1ab2e552acdb8c0609e" title="Sets a user callback object, which receives callbacks on all contacts generated for specified actors...">PxScene.setContactModifyCallback()</a> <a class="el" href="classPxScene.html#a1978693b355df49712d7e59c10c4115d" title="Retrieves the PxContactModifyCallback pointer set with setContactModifyCallback(). ">PxScene.getContactModifyCallback()</a> </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ad6c57abf114d4c594973c2d365a98b6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6c57abf114d4c594973c2d365a98b6f">&#9670;&nbsp;</a></span>~PxContactModifyCallback()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual PxContactModifyCallback::~PxContactModifyCallback </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a383f0448886bf352215c886b3066f790"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a383f0448886bf352215c886b3066f790">&#9670;&nbsp;</a></span>onContactModify()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void PxContactModifyCallback::onContactModify </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxContactModifyPair.html">PxContactModifyPair</a> *const&#160;</td>
          <td class="paramname"><em>pairs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Passes modifiable arrays of contacts to the application. </p>
<p>The initial contacts are as determined fresh each frame by collision detection.</p>
<p>The number of contacts can not be changed, so you cannot add your own contacts. You may however disable contacts using <a class="el" href="classPxContactSet.html#a930b0b6a5450e9b2e83634d6803f4045" title="Ignore the contact point. ">PxContactSet::ignore()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxContactModifyPair.html" title="An array of instances of this class is passed to PxContactModifyCallback::onContactModify(). ">PxContactModifyPair</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxContactModifyCallback_8h_source.html">PxContactModifyCallback.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classPxContactModifyCallback.html">PxContactModifyCallback</a></li>
    <li class="footer">Copyright &copy; 2008-2021 NVIDIA Corporation, 2788 San Tomas Expressway, Santa Clara, CA 95051 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a></li>
  </ul>
</div>
</body>
</html>
